app.factory("appShopCreator", ["Shop", function (Shop) {

    function AppShopCreator() {
        Shop.call(this, {
            data: {
                description: "",
                name: "",
                login: "",
                location: {
                    address: "",
                    city: "",
                    postal_code: "",
                    loc: {
                        type: "Point",
                        coordinates: []
                    },
                    neighborhood: null
                },
                contact: {
                    tel: "",
                    email: ""
                },
                categories: [],
                tags: [],
                front: {
                    src: "/api/image/shop/front/default"
                },
                picto: {
                    src: "/api/image/shop/picto/default"
                },
                dates: {
                    creation: null
                },
                users: {
                    subscribers: [],      /*utilisateur abonnés à la boutique*/
                    near: [],             /*utilisateur proche de la boutique*/
                    employees: []        /*utilisateur travaillant dans laboutique*/
                },
                shops: {
                    subscriptions: [],    /*liste de boutique abonnées*/
                    subscribers: [],      /*boutique abonnés à la boutique*/
                    near: []              /*boutique proche de la boutique*/
                },
                alerts: {
                    total: 0,
                    alive: []
                }
            }
        });
    };

    AppShopCreator.prototype = Object.create(Shop.prototype);
    AppShopCreator.prototype.constructor = AppShopCreator;

    return new AppShopCreator();

} ]);
